package com.hmz.backend.controller.notice;

import cn.hutool.json.JSONObject;
import com.hmz.backend.service.notice.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
public class NoticeController {
    @Autowired
    NoticeService noticeService;
    @PostMapping("/sendnotice")
    public JSONObject sendNotice(@RequestBody JSONObject data){
        System.out.println("发布公告接口调用");
        return noticeService.sendNotice(data);
    }
    @GetMapping("/getnotice")
    public JSONObject getNotice( int pageNow,int pageSize){
        System.out.println("请求公告接口调用");
        return noticeService.getNotice(pageNow,pageSize) ;
    }
}
